package com.barryredmond.mileagecalc;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class MileageMIDlet extends MIDlet{
    
    private static MileageMIDlet SINGLETON;
    
    public static MileageMIDlet getMileageMIDlet(){
        return SINGLETON;
    }
    
    private MileageForm mileageForm;
    
    public MileageMIDlet(){
        SINGLETON = this;
        mileageForm = new MileageForm();
        Display.getDisplay(this).setCurrent(mileageForm);
    }

    protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
        
    }

    protected void pauseApp() {
        
    }

    protected void startApp() throws MIDletStateChangeException {
        
    }

    public void showAlert(Alert alert) {
        Display.getDisplay(this).setCurrent(alert);
    }

}
